#include <bits/stdc++.h>

#define ll long long
#define ull unsigned long long
#define uint unsigned int

#define YES cout << "YES" << '\n'
#define NO cout << "NO" << '\n'
#define endl '\n'
const int INF = 1e9;
const int MOD = 998244353;
using namespace std;

/*思考

*/

void solve() {
    int n, k, max_h = 0;
    cin >> n >> k;
    vector<int> h(n + 1);
    for (int i = 1; i <= n; i++) {
        cin >> h[i];
        if (h[i] > max_h) {
            max_h = h[i];
        }
    }
    int init = h[k];
    if (max_h == init) {
        YES;
        return;
    }
    int index = 0;
    sort(h.begin(), h.end());
    for (int i = 1; i < n; i++) {
        if (h[i] == init) {
            index = i;
        }
    }
    for(int i=index;i<n;i++){
        if (h[i + 1] - h[i] > init) {
            NO;
            return;
        }
    }
    YES;
}

int main() {
    ios::sync_with_stdio(0);
    cin.tie(0);
    int t = 0;
    cin >> t;
    while (t--) solve();
    return 0;
}
